from interface.models import InterfaceList
from interface.models import InterfaceTestCase
from interface.models import InterfaceTestSuite
from interface.models import RunTestSuite
import django_filters

class CaseFilters(django_filters.filterset):
    case_result = django_filters.BooleanFilter(lookup_expr='iexact')
    case_name = django_filters.CharFilter(lookup_expr='icontains')
    case_modifier = django_filters.CharFilter(lookup_expr='icontains')
    case_mtime = django_filters.DateTimeFilter(lookup_expr='datatime')
    case_mtime__gt = django_filters.DateTimeFilter(name='case_mtime', lookup_expr='mtime__gt')
    case_mtime__lt = django_filters.DateTimeFilter(name='case_mtime', lookup_expr='mtime__lt')

    class Meta:
        model = InterfaceTestCase
        fields = ['case_result', 'case_name', 'case_modifier','case_mtime']
